package com.hyt.it.ogt.kq.common.gov.enums.admission;

/**
 * 模板类型
 *
 * @author zhoumiao
 * @since 2023/2/2 11:48
 **/
public enum TemplateTypeEnum {
    STANDARD_1(1, "标准模板1"),
    STANDARD_2(2, "标准模板2"),
    CUSTOM(3, "自定义模板"),
    ;

    private Integer code;
    private String text;

    TemplateTypeEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    public Integer getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    /**
     * 是否标准模板
     *
     * @param code
     * @return
     */
    public static boolean isStandard(int code) {
        return STANDARD_1.getCode() == code
                || STANDARD_2.getCode() == code;
    }
}
